import { Entity } from '@sker/core';
import { PrimaryGeneratedColumn } from 'typeorm';
import { Code, CreateDate, Digdit, Jsonb, Mobile, Password, Username } from '../utils';
@Entity({
    name: 'auto_user'
})
export class AutoUser {
    @PrimaryGeneratedColumn()
    id: number;

    @Username()
    username: string;

    @Password()
    password: string;

    @Code()
    salt: string;

    @CreateDate()
    create_date: Date;

    @Digdit({ default: 0 })
    device_count: number;

    @Digdit({ default: 0 })
    max_count: number;

    @Code({ default: '' })
    realname: string;

    @Mobile({ default: '' })
    mobile: string;

    @Mobile({ default: '' })
    replace_mobile: string;

    @Code({ default: '' })
    token: string;

    @Code({ default: `0` })
    is_admin: string;

    @Code({ default: '18639118753' })
    from: string;


    @Jsonb({ nullable: true })
    setting: any;
}